from django.urls import path,re_path
from . import views
from rest_framework.routers import DefaultRouter


router = DefaultRouter()
router.register(r'userroledemo3', views.UserRoleSerializerViewSetDemo3, basename='UserRoleSerializerViewSetDemo3')


urlpatterns = [
    path("students1/", views.CaseDemo14UserSerializerViewDemo1.as_view()),
    path("userrole1/",views.CaseDemo14UserRoleSerializerViewDemo1.as_view()),

    path('userroledemo2/', views.UserRoleSerializerListCreateViewDemo2.as_view()),
    path('userroledemo2/<int:pk>/', views.UserRoleSerializerCRUDViewDemo2.as_view()),


    path('studentsdemo1/', views.StudentListCreateView.as_view()),# 做个测试
    path("classroomdemo1/",views.ClassroomListCreateView.as_view()),


    path('userroledemo5/', views.CaseDemo14UserRoleListCreateViewDemo5.as_view(), name='userrole-list-create'),
    path('userroledemo5/<int:pk>/', views.CaseDemo14UserRoleDetailViewDemo5.as_view(), name='userrole-detail'),
]+ router.urls
